
package br.siseventos.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


public class ConfigHelper {
    private String path;
    private Properties prop;

    public ConfigHelper(String path) throws IOException {
        this.path = path;
        
        // Carregando a input stream
        InputStream is = ConfigHelper.class.getClassLoader().getResourceAsStream(path);
        
        // Inicializando o objeto Properties
        prop = new Properties();
        prop.load(is);
        
    }
    
    public String getProperty(String property){
        return prop.getProperty(property);
    }
    
    public void setProperty(String property, String value){
        prop.setProperty(property, value);
    }
    
}
